﻿<%@ Page Title="注册" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Register.aspx.cs" Inherits="STP.Account.Register" %>

<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">
    <h2><%: Title %>.</h2>
    <p class="text-danger">
        <asp:Literal runat="server" ID="ErrorMessage1" />
    </p>

    <div class="form-horizontal">
        <h4>用户注册</h4>
        <hr />
        <asp:ValidationSummary runat="server" CssClass="text-danger" />
        <div class="form-group">
            <asp:Label runat="server" AssociatedControlID="Name" CssClass="col-md-2 control-label">用户名</asp:Label>
            <div class="col-md-10">
                <asp:TextBox runat="server" ID="Name" CssClass="form-control" />
                <asp:RequiredFieldValidator runat="server" ControlToValidate="Name" ID="rfv1"
                    CssClass="text-danger" ErrorMessage="用户名不能为空" />
            </div>
        </div>
        <div class="form-group">
            <asp:Label runat="server" AssociatedControlID="Password" CssClass="col-md-2 control-label">密码</asp:Label>
            <div class="col-md-10">
                <asp:TextBox runat="server" ID="Password" CssClass="form-control" TextMode="Password"  />
                <asp:RequiredFieldValidator runat="server" ControlToValidate="Password" ID="rfv2"
                    CssClass="text-danger" ErrorMessage="密码不能为空" />
            </div>
        </div>
        <div class="form-group">
            <asp:Label runat="server" AssociatedControlID="ConfirmPassword" CssClass="col-md-2 control-label">确认密码</asp:Label>
            <div class="col-md-10">
                <asp:TextBox runat="server" ID="ConfirmPassword" TextMode="Password" CssClass="form-control" />
                <asp:RequiredFieldValidator runat="server" ControlToValidate="ConfirmPassword" ID="rfv3"
                    CssClass="text-danger" Display="Dynamic" ErrorMessage="请确认密码" />
                <asp:CompareValidator runat="server" ControlToCompare="Password" ControlToValidate="ConfirmPassword" ID="rfv4"
                    CssClass="text-danger" Display="Dynamic" ErrorMessage="密码不一致" />
            </div>
        </div>  

        <div class="form-group">
            <asp:Label runat="server" ID="Email" CssClass="col-md-2 control-label">Email</asp:Label>
            <div class="col-md-10">
                <asp:TextBox runat="server" id="EmailBox" />
            </div>
        </div>

        <div class="form-group">
            <asp:Label runat="server" ID="Label2" CssClass="col-md-2 control-label">手机号</asp:Label>
            <div class="col-md-10">
                <asp:TextBox runat="server" id="PhoneBox" />
            </div>
        </div>
        
        <div class="form-group">
            <asp:Label runat="server" ID="Label3" CssClass="col-md-2 control-label">性别</asp:Label>
            <div class="col-md-10">
                <asp:RadioButton ID="RadioButton1" runat="server"  Text="男" GroupName="sex" />
                <asp:RadioButton ID="RadioButton2" runat="server" Text="女" GroupName="sex"/>
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <asp:Button runat="server" OnClick="CreateUser_Click" Text="注册用户" CssClass="btn btn-default" />
            </div>
        </div>
        
    </div>
</asp:Content>
